import hyRequest from "../index";

enum LoginApi{
    AccountLogin='/login',
    LoginUserInfo='/users/',
    userMenus='/role/'
}
export function accountLoginRequest(account){
    return hyRequest.post({
          url:LoginApi.AccountLogin,
          data:account
    })
}

export function requestUserInfoById(id:number):any{
    return hyRequest.get({
          url:LoginApi.LoginUserInfo+id,
          showLoading:false
    })
}

export function requestUserMenusByRoleId(id:number):any{
    return hyRequest.get({
          url:LoginApi.userMenus+id+'/menu',
          showLoading:false
    })
}